<h1> Bill</h1>
<div class='float_frame'> <%= render(:partial=>'stocks/search') %> </div>
<%= form_for(@bill) do|f| %>
  <% if @bill.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@bill.errors.count, "error") %> prohibited this bill from being saved:</h2>

      <ul>
      <% @bill.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

    
Customer: <%= f.select(:customer_id,Customer.all.collect {|p| [ p.name, p.id ] }, {:include_blank => true}) %>
Electerician: <%= f.select(:electrician_id,Electrician.all.collect {|p| [ p.name, p.id ] }, {:include_blank => true}) %>
Date: <%= f.text_field :sold_date %>
<%= f.hidden_field :ref_id, :value => @bill.ref_id %>
<%= render(:partial=>'bills/bill_sold_table') %>
Total: <label id="bill_amount"></label><br/>
<%= f.submit "Save" %>
<%end%>
